The present invention relates to memory card systems, and more particularly, to a write method for memory card systems.
Portable electronic devices such as digital cameras, MP3 players, mobile phones, and personal digital assistants (PDAs) have become significant consumer staples in recent years. Flash memory devices are commonly used as accessory components in conjunction with portable electronic devices. The non-volatile data storage capabilities, low power consumption, and high degree of memory cell integration make flash memory an ideal medium for storing the digital data used in portable electronic devices.
Unfortunately, flash memory is not able to directly perform an over-write operation in a manner similar to that of a conventional hard disk drive, since flash memory must be placed in an initial state or an erase state before writing data. That is, flash memory must first erase a designated portion of available memory before writing new data. This sequence of steps is referred to as an erase-before-write operation.
An erase operation within flash memory generally takes a longer period of time than a write operation. Because an erase unit for flash memory is typically greater in size than a write unit, some memory portion is needlessly erased with each over-write operation. Accordingly, the data initially stored in this unintentionally erased portion of memory must be restored using one or more rewrite operation(s).
Because flash memory must execute an erase operation and a rewrite operation in conjunction with a write operation, the overall efficiency of flash memory write operations is lower than the read operation, and also lower than conventional write operation directed to a hard disk. Additionally, as tens of thousands or hundreds of thousands of erase operations are performed in relation to a particular block of flash memory, the block will ultimately become useless due to the conventionally understood “wearing” phenomenon. Accordingly, a wear leveling operation must be performed on the flash memory in order to extend the useful life of the memory.
The so-called flash translation layer (FTL) is specialized software running in relation to flash memory to overcome the above-mentioned limitations and effectively manage the use of the flash memory. The FTL receives a logical address (LA) and then converts it to a physical address (PA). Here, the physical address PA is an actual address used to store data in the flash memory.
In order to manage the overall address mapping operation, an address mapping table is generally required. The address mapping table is typically stored in an associated random access memory (RAM) during operation of the flash memory. The address mapping table includes all logical addresses and corresponding physical addresses. The size of the address mapping table may vary according to the number and size of mapping units, as well as various mapping methods used in relation to the mapping unit. Representative mapping methods includes (e.g.) page mapping, block mapping, and hybrid mapping.
The page mapping method utilizes a page mapping table. The page mapping table enables the execution of a mapping operation by page unit, and stores a logical address and corresponding physical address. The block mapping method utilizes a block mapping table. The block mapping table enables the execution of a mapping operation by block unit, and stores a logical block and a corresponding physical block. The hybrid mapping method utilizes aspects of both the page mapping method and the block mapping method.
One memory block generally includes tens or hundreds of pages. Accordingly, if the page mapping method is used, the size of the mapping table is increased at least ten or hundred times than the block mapping method. That is, the page mapping method requires a great deal of RAM memory to store the mapping table, as compared with other methods.
On the other hand, because the block mapping method performs a mapping operation by block unit, the size of the resulting mapping table, particularly as compared with the page mapping method, is quite small. However, in the block mapping method, because a position of a page to be used in a block is fixed, a merge operation must be performed more frequently.
The hybrid mapping method uses the page mapping method with respect to a log block and the block mapping method with respect to a data block. Since the hybrid mapping method uses two mapping methods, the size of a mapping table and the number of merge operations can be reduced.
During a write operation, “write data” or data to be stored in a data block is first stored in a log block through an out-of-place ordering method. That is, regardless of logical page numbers corresponding to pages transmitted from a host, the write data is stored in an empty page of the log block. If all pages of the log block are used or there is no usable log block, page data stored in a log block and a data block corresponding thereto will be stored in a new data block using a merge operation. Unlike the log block, the write data is stored in the data block through an in-place ordering method. That is, in accordance with the logical page number of page data to be stored, the page data is stored in a page of a corresponding position in the data block.
If a merge operation is performed during the above method, a plurality of page and block copy operation must be performed. For example, if one data block includes four pages, four page copies and two block erase operations must be performed. Therefore, when the hybrid mapping method is used, performance of a memory card system can be deteriorated due to the large number of required page copy operations.
In the hybrid mapping method, one data block allocates only one log block. Accordingly, if data in a particular page is updated, the previous page of data becomes invalid, such that valid pages and invalid pages exist together in a log block. If a log block having invalid pages and a data block corresponding thereto are merged, a large number of page copies will be required. Because the log block including invalid pages requires a large number of page copies during a merge operation, performance of a memory card system is deteriorated.